/**
 * 
 */
package hu.gbalage.owl.editor;

import hu.gbalage.owl.editor.events.IOWLEntitySelectionListener;

import java.util.HashSet;
import java.util.Set;

import org.semanticweb.owl.model.OWLEntity;

/**
 * @author balage
 *
 */
public class TabManager {

	private final Set<IOWLEntitySelectionListener> listeners = new HashSet<IOWLEntitySelectionListener>();
	
	public void addEntitySelectionListener(IOWLEntitySelectionListener listener){
		listeners.add(listener);
	}
	
	public void removeEntitySelectionListener(IOWLEntitySelectionListener listener){
		listeners.remove(listener);
	}
	
	public void selectEntity(OWLEntity entity){
		for(IOWLEntitySelectionListener l : listeners)
			l.entitySelected(entity);
	}
	
}
